package soccer.view;

import javax.swing.JPanel;
import javax.swing.JLabel;
import javax.swing.JTextField;
import javax.swing.JTabbedPane;
import javax.swing.border.LineBorder;
import java.awt.Color;
import javax.swing.JComboBox;
import javax.swing.SwingConstants;
import javax.swing.JList;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.table.DefaultTableModel;
import javax.swing.JButton;

public class MatchResultEnterPanel extends JPanel {
	private JPanel matchSelectOptionPanel;
	private JTextField homeSkorTextField;
	private JPanel matchPlayerSelectionPanel;
	private JTabbedPane matchPlayerAndGoalsSelection;
	private JComboBox matchWeekComboBox;
	private JComboBox matchComboBox;
	private JTable homeGoals;
	private JButton addGoalToGoalTableButton;

	/**
	 * Create the panel.
	 */
	public MatchResultEnterPanel() {
		setLayout(null);
		
		matchSelectOptionPanel = new JPanel();
		matchSelectOptionPanel.setBorder(new LineBorder(new Color(153, 153, 153), 1, true));
		matchSelectOptionPanel.setBounds(10, 28, 144, 255);
		add(matchSelectOptionPanel);
		matchSelectOptionPanel.setLayout(null);
		
		matchWeekComboBox = new JComboBox();
		matchWeekComboBox.setBounds(70, 11, 46, 20);
		matchSelectOptionPanel.add(matchWeekComboBox);
		
		JLabel lblNewLabel_1 = new JLabel("Week :");
		lblNewLabel_1.setBounds(10, 14, 46, 14);
		matchSelectOptionPanel.add(lblNewLabel_1);
		
		JLabel lblTeamSelect = new JLabel("Match Select");
		lblTeamSelect.setHorizontalAlignment(SwingConstants.CENTER);
		lblTeamSelect.setBounds(10, 86, 124, 14);
		matchSelectOptionPanel.add(lblTeamSelect);
		
		matchComboBox = new JComboBox();
		matchComboBox.setBounds(10, 113, 124, 20);
		matchSelectOptionPanel.add(matchComboBox);
		
		matchPlayerAndGoalsSelection = new JTabbedPane(JTabbedPane.TOP);
		matchPlayerAndGoalsSelection.setBounds(164, 28, 358, 255);
		add(matchPlayerAndGoalsSelection);
		
		matchPlayerSelectionPanel = new JPanel();
		matchPlayerAndGoalsSelection.addTab("Players", null, matchPlayerSelectionPanel, null);
		matchPlayerSelectionPanel.setLayout(null);
		
		JLabel lblNewLabel = new JLabel("Home Skor");
		lblNewLabel.setBounds(10, 11, 51, 14);
		matchPlayerSelectionPanel.add(lblNewLabel);
		
		homeSkorTextField = new JTextField();
		homeSkorTextField.setBounds(71, 8, 32, 20);
		matchPlayerSelectionPanel.add(homeSkorTextField);
		homeSkorTextField.setColumns(10);
		
		JScrollPane scrollPane = new JScrollPane();
		scrollPane.setBounds(11, 59, 92, 132);
		matchPlayerSelectionPanel.add(scrollPane);
		
		JLabel lblSelectPlayer = new JLabel("Select 11 Player");
		lblSelectPlayer.setBounds(10, 36, 93, 14);
		matchPlayerSelectionPanel.add(lblSelectPlayer);
		
		JScrollPane scrollPane_1 = new JScrollPane();
		scrollPane_1.setBounds(189, 47, 136, 144);
		matchPlayerSelectionPanel.add(scrollPane_1);
		
		homeGoals = new JTable();
		homeGoals.setModel(new DefaultTableModel(
			new Object[][] {
			},
			new String[] {
				"Minute", "Player"
			}
		));
		scrollPane_1.setViewportView(homeGoals);
		
		addGoalToGoalTableButton = new JButton("Add Goal");
		addGoalToGoalTableButton.setBounds(236, 11, 89, 23);
		matchPlayerSelectionPanel.add(addGoalToGoalTableButton);
		matchPlayerAndGoalsSelection.setEnabledAt(0, true);

	}
}
